package com.cimpm.project.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.hby.common.annotation.entity.AllowNull;
import com.hby.common.annotation.entity.VerifyRepetitionField;
import com.hby.common.typeHandler.DateTypeHandler;

import java.util.Date;

@TableName("project_project_role")
public class ProjectRole {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

	@VerifyRepetitionField
	private String name;

	@AllowNull
	private String description;

    @TableField(typeHandler = DateTypeHandler.class)
    private String createTime;

	@VerifyRepetitionField
	private String code;

    @TableLogic
    private Date isDeleted;

    @Version
    private Integer version;

    public Integer getId() { return id; }

    public void setId(Integer id) { this.id = id; }

    public String getName() { return name; }

    public void setName(String name) { this.name = name; }

    public String getDescription() { return description; }

    public void setDescription(String description) { this.description = description; }

    public String getCreateTime() { return createTime; }

    public void setCreateTime(String createTime) { this.createTime = createTime; }

    public String getCode() { return code; }

    public void setCode(String code) { this.code = code; }

    public Date getIsDeleted() { return isDeleted; }

    public void setIsDeleted(Date isDeleted) { this.isDeleted = isDeleted; }

    public Integer getVersion() { return version; }

    public void setVersion(Integer version) { this.version = version; }

    @Override
    public String toString() {
    return "role{" +
            "id=" + id +
            ", name=" + name +
            ", description=" + description +
            ", createTime=" + createTime +
            ", code=" + code +
            ", isDeleted=" + isDeleted +
            ", version=" + version +
            '}';
    }

}
